/**
 * from 表单
 */
export function get_from (URL, PARAMS) {
  var p = new Promise((resolve, reject) => {
    var temp = document.createElement('form');
    temp.action = URL;
    temp.method = 'get';
    temp.style.display = 'none';
    for (var x in PARAMS) {
      var opt = document.createElement('textarea');
      opt.name = x;
      opt.value = PARAMS[x];
      temp.appendChild(opt);
    }
    document.body.appendChild(temp);
    temp.submit();
    this.$Loading.finish();
    resolve(temp);
  });
  return p;
}
